package com.klun.project.dal.common;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

public class ReadWriteDataSource extends AbstractRoutingDataSource {
	private ReadWriteKey readWriteKey;

	public ReadWriteDataSource() {
	}

	protected Object determineCurrentLookupKey() {
		String key = this.readWriteKey.getKey();
		return key;
	}

	public ReadWriteKey getReadWriteKey() {
		return this.readWriteKey;
	}

	public void setReadWriteKey(ReadWriteKey readWriteKey) {
		this.readWriteKey = readWriteKey;
	}
}
